package guyubao.com.entity.vo.request;

import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.Email;
import javax.validation.constraints.Pattern;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * 用户注册
 * @author wxa
 */
@Data
@Schema(description = "用户注册")
public class EmailRegisterVoRequest {
    @Pattern(regexp = "^[a-zA-Z0-9\\u4e00-\\u9fa5]+$|^[A-Za-z0-9\\u4e00-\\u9fa5]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$")
    @Length(min=2,max=100)
    String username;
    @Email
    @Length(min=4,max=100)
    String email;
    @Length(min=6,max=20)
    String password;
    @Length(max=6,min=6)
    String code;

}
